﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RoutingAlgorithms
{
    class Node
    {
        private int id;

        public int Id
        {
            get { return id; }
        }
        private List<Link> links;

        public List<Link> Links
        {
            get { return links; }
            set { links = value; }
        }

        public Node()
        {
            id = -1;
            links = new List<Link>();
        }

        public Node(int id)
        {
            this.id = id;
            links = new List<Link>();
        }

        public Node(Node node)
        {
            this.id = node.id;
            List<Link> tempLinks = new List<Link>();

            foreach (Link link in node.links)
            {
                Link lk = new Link(link);
                tempLinks.Add(lk);
            }
            this.links = tempLinks;
        }

        public void addLink(Link link)
        {
            links.Add(link);
        }
    }
}
